﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="PS_HisDiscipline.aspx.cs" Inherits="KPIS.GERP.GHRMS.APP.App_UI.Forms.PS_HisDiscipline" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">

        <link href="../../Styles/CssClass.css" rel="stylesheet" type="text/css" />
        <telerik:RadCodeBlock ID="RadCodeBlock1" runat="server">
        <script type="text/javascript">
            <!--
            
           function onTextChange(sender) {
               if (sender.get_value() == "") {
                   sender.set_text("");
               }
           }
             --> 
        </script>
        </telerik:RadCodeBlock>
    <!-- end of custom head section -->
</head>
<body >
    <form id="mainForm" runat="server">
        <telerik:RadCodeBlock ID="RadCodeBlock2" runat="server">        
            <script type="text/javascript">
                function RowDblClick(sender, eventArgs) {
                    sender.get_masterTableView().editItem(eventArgs.get_itemIndexHierarchical());
                }
                function onTextChange(sender) {
                    if (sender.get_value() == "") {
                        sender.set_text("");
                    }
                }
            </script>        
    </telerik:RadCodeBlock>
    
    <telerik:RadScriptManager ID="RadScriptManager1" runat="server">
    </telerik:RadScriptManager>
    <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
        <AjaxSettings>
            <telerik:AjaxSetting AjaxControlID="cmdSearch">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="RadTreeView1" 
                        LoadingPanelID="RadAjaxLoadingPanel2" />
                </UpdatedControls>
            </telerik:AjaxSetting>
            <telerik:AjaxSetting AjaxControlID="cmdExpand">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="RadTreeView1"
                        LoadingPanelID="RadAjaxLoadingPanel2" />
                </UpdatedControls>
            </telerik:AjaxSetting>
            <telerik:AjaxSetting AjaxControlID="cmdCollapse">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="RadTreeView1" 
                        LoadingPanelID="RadAjaxLoadingPanel2" />
                </UpdatedControls>
            </telerik:AjaxSetting>
            <telerik:AjaxSetting AjaxControlID="RadTreeView1">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="lblUpperText" />
                    <telerik:AjaxUpdatedControl ControlID="RadGrid1" 
                        LoadingPanelID="RadAjaxLoadingPanel2" />
                </UpdatedControls>
            </telerik:AjaxSetting>
            <telerik:AjaxSetting AjaxControlID="RadGrid1">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="RadGrid1" 
                        LoadingPanelID="RadAjaxLoadingPanel2" />
                </UpdatedControls>
            </telerik:AjaxSetting>
        </AjaxSettings>
    </telerik:RadAjaxManager>
    <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server" 
        Height="100%" Width="75px" Transparency="50">
        <table style="height: 100%; width: 100%" border="0">
            <tr>
                <td width="100%" align="center" valign="middle">
                    <img alt="Loading..." 
                        src="../Images/Buttons/loading.gif" 
                        style="border: 0px;" />
                </td>
            </tr>
        </table>
    </telerik:RadAjaxLoadingPanel>
        <!-- content start -->
         <div class="moduleDivSlim1000x450">
         <div class="moduleDivBottom1000">            
            <table width = "1000px">
            <tr>
            <td class ="tableHeader">ประวัติการศึกษา<asp:Label ID="lblEmpSeq" runat="server" 
                                    Text='<%# DataBinder.Eval( Container, "DataItem.Employee.Sequence"  ) %>' 
                                    Visible="False"></asp:Label>
                            </td>
            </tr>
            <tr>  
            <td>          
            <asp:Panel ID="Panel5" runat="server" Height="400px" Width = "980" ScrollBars ="Auto">
            <telerik:RadGrid 
                            ID="RadGrid1" 
                            runat="server" 
                            AllowAutomaticDeletes="True" 
                            AllowFilteringByColumn="True" 
                            AllowMultiRowEdit="True" 
                            AllowMultiRowSelection="True" 
                            AllowPaging="True" 
                            AllowSorting="True" 
                            AutoGenerateColumns="False" 
                            EnableAJAX="True" 
                            EnableAJAXLoadingTemplate="True" 
                            GridLines="None" 
                            OnItemCommand="RadGrid1_ItemCommand" 
                            Skin="Outlook" 
                            Width="950px">
                            <FooterStyle Font-Names="Sans-serif" />
                            <AlternatingItemStyle Font-Names="Sans-serif" />
                            <ItemStyle Font-Names="Sans-serif" />
                            <PagerStyle Font-Names="Sans-serif" />
                            <MasterTableView AllowMultiColumnSorting="True" CellSpacing="-1" 
                                ClientDataKeyNames="Sequence" 
                                CommandItemDisplay="Top" 
                                DataKeyNames="Sequence" 
                                InsertItemPageIndexAction="ShowItemOnCurrentPage" 
                                NoMasterRecordsText="&lt; ไม่มีข้อมูล &gt;">
                                <CommandItemTemplate>
                                    <table width="100%">
                                        <tr>
                                            <td>
                                                <asp:LinkButton ID="cmdAddNew" runat="server" CausesValidation="False" 
                                                    CommandName="InitInsert"                                                    
                                                    
                                                    Visible="<%# !RadGrid1.MasterTableView.IsItemInserted && RadGrid1.EditIndexes.Count <= 0 %>">
                                        <img style="border:0px;vertical-align:middle;" alt="" 
                                        src="../Images/Buttons/AddRecord.gif" /> เพิ่มประวัติการศึกษา</asp:LinkButton>
                                               </td>
                                            <td align="right">
                                                
                                            </td>
                                        </tr>
                                    </table>
                                </CommandItemTemplate>
                                <RowIndicatorColumn>
                                    <HeaderStyle Width="15px" />
                                </RowIndicatorColumn>
                                <ExpandCollapseColumn>
                                    <HeaderStyle Width="15px" />
                                </ExpandCollapseColumn>                                
                                <Columns>
                                <telerik:GridEditCommandColumn 
                                        EditText = "คลิกเพื่อแก้ไขรายการ"
                                        ButtonType="ImageButton">
                                         <HeaderStyle HorizontalAlign="Center" Width="15px" />
                                        <ItemStyle HorizontalAlign="Center" Width="15px" />
                                    </telerik:GridEditCommandColumn>
                                    <telerik:GridButtonColumn 
                                        ButtonType="ImageButton" 
                                        CommandName="Delete" 
                                        ConfirmDialogType="RadWindow" 
                                        ConfirmText="ลบข้อมูลที่เลือก?" 
                                        ItemStyle-Width="15" 
                                        Text="คลิกเพื่อลบรายการ" 
                                        UniqueName="column1">
                                        <HeaderStyle HorizontalAlign="Center" Width="15px" />
                                        <ItemStyle HorizontalAlign="Center" Width="15px"/>
                                    </telerik:GridButtonColumn>
                                <telerik:GridBoundColumn 
                                        DataField="Sequence" 
                                        DataType="System.Int32" 
                                        Display="False" 
                                        HeaderText="Sequence" 
                                        ReadOnly="True" 
                                        UniqueName="Sequence" 
                                        Visible="False">
                                    </telerik:GridBoundColumn>
                                    <telerik:GridBoundColumn 
                                        DataField="Degree.Name" 
                                        FilterControlWidth = "100%"
                                        AutoPostBackOnFilter ="true"
                                        ShowFilterIcon ="false"
                                        HeaderStyle-HorizontalAlign="Center" 
                                        HeaderText="ระดับการศึกษา" 
                                        UniqueName="Degree.Name">
                                        <HeaderStyle HorizontalAlign="Center" Width="200px" />
                                        <ItemStyle Width="150px" />
                                    </telerik:GridBoundColumn>
                                    <telerik:GridBoundColumn 
                                        DataField="Qualification.Name" 
                                        FilterControlWidth = "100%"
                                        AutoPostBackOnFilter ="true"
                                        ShowFilterIcon ="false"
                                        HeaderStyle-HorizontalAlign="Center" 
                                        HeaderText="วุฒิการศึกษา" 
                                        UniqueName="Qualification.Name">
                                        <HeaderStyle HorizontalAlign="Center" Width="200px" />
                                        <ItemStyle Width="150px" />
                                    </telerik:GridBoundColumn>
                                    <telerik:GridBoundColumn 
                                        DataField="Major.Name" 
                                        FilterControlWidth = "100%"
                                        AutoPostBackOnFilter ="true"
                                        ShowFilterIcon ="false"
                                        HeaderStyle-HorizontalAlign="Center" 
                                        HeaderText="สาขาวิชา" 
                                        UniqueName="Major.Name">
                                        <HeaderStyle HorizontalAlign="Center" Width="200px" />
                                        <ItemStyle Width="150px" />
                                    </telerik:GridBoundColumn>
                                    <telerik:GridBoundColumn 
                                        DataField="Institute.Name" 
                                        FilterControlWidth = "100%"
                                        AutoPostBackOnFilter ="true"
                                        ShowFilterIcon ="false"
                                        HeaderStyle-HorizontalAlign="Center" 
                                        HeaderText="สถาบัน" 
                                        UniqueName="Institute.Name">
                                        <HeaderStyle HorizontalAlign="Center" Width="150px" />
                                        <ItemStyle Width="150px" />
                                    </telerik:GridBoundColumn>
                                    <telerik:GridBoundColumn 
                                        DataField="GPA" 
                                        FilterControlWidth = "100%"
                                        AutoPostBackOnFilter ="true"
                                        ShowFilterIcon ="false"
                                        HeaderStyle-HorizontalAlign="Center" 
                                        HeaderText="GPA" 
                                        UniqueName="GPA">
                                        <HeaderStyle HorizontalAlign="Center" Width="50px" />
                                        <ItemStyle Width="50px" />
                                    </telerik:GridBoundColumn>
                                    <telerik:GridBoundColumn 
                                        DataField="StartDate" 
                                        DataFormatString="{0:dd/MM/yyyy}"
                                        FilterControlWidth = "100%"
                                        AutoPostBackOnFilter ="true"
                                        ShowFilterIcon ="false"
                                        HeaderStyle-HorizontalAlign="Center" 
                                        HeaderText="วันที่เริ่มศึกษา" 
                                        UniqueName="StartDate">
                                        <HeaderStyle HorizontalAlign="Center" Width="100px" />
                                        <ItemStyle Width="100px" />
                                    </telerik:GridBoundColumn>
                                    <telerik:GridBoundColumn 
                                        DataField="EndDate" 
                                        DataFormatString="{0:dd/MM/yyyy}"
                                        FilterControlWidth = "100%"
                                        AutoPostBackOnFilter ="true"
                                        ShowFilterIcon ="false"
                                        HeaderStyle-HorizontalAlign="Center" 
                                        HeaderText="วันที่สำเร็จการศึกษา" 
                                        UniqueName="EndDate">
                                        <HeaderStyle HorizontalAlign="Center" Width="100px" />
                                        <ItemStyle Width="100px" />
                                    </telerik:GridBoundColumn>
                                    <telerik:GridBoundColumn 
                                        DataField="Remarks" 
                                        FilterControlWidth = "100%"
                                        AutoPostBackOnFilter ="true"
                                        ShowFilterIcon ="false"
                                        HeaderStyle-HorizontalAlign="Center" 
                                        HeaderText="หมายเหตุ" 
                                        UniqueName="Remarks">
                                        <HeaderStyle HorizontalAlign="Center" Width="100px" />
                                        <ItemStyle Width="100px" />
                                    </telerik:GridBoundColumn>
                    </Columns>
                                <EditFormSettings                                     
                                    EditFormType="WebUserControl" 
                                    UserControlName="../UserControls/PS_HisEducations.ascx">
                                    <EditColumn UniqueName="EditCommandColumn1"></EditColumn>
                                </EditFormSettings>
                                <PagerStyle Mode="NextPrevNumericAndAdvanced" />
                            </MasterTableView>
                            <SelectedItemStyle Font-Names="Sans-serif" />
                            <HeaderStyle Font-Names="Sans-serif" />
                            <GroupHeaderItemStyle Font-Names="Sans-serif" />
                            <ClientSettings AllowColumnHide="True" 
                                AllowColumnsReorder="True" 
                                EnableRowHoverStyle="True" 
                                ReorderColumnsOnClient="True">
                                <Selecting AllowRowSelect="True" 
                                EnableDragToSelectRows="true" />
                                </ClientSettings>
                            <ActiveItemStyle Font-Names="Sans-serif" />
                            <CommandItemStyle Font-Names="Sans-serif" />
                        </telerik:RadGrid>
            </asp:Panel>
            </td>
            </tr>
            </table>
        </div>
        </div>
    </form>
</body>
</html>
